//
// Created by guanzhe on 16/1/5.
// Copyright (c) 2016 BMProject. All rights reserved.
//

#import "DitchMsgChangeVpnCell.h"
#import "DataModel.h"
#import "OrderVc.h"
#import "NSDate+Utils.h"
#import "DitchMsgChangeAddressCell.h"
#import "DitchMsgChangeBankCell.h"


@interface DitchMsgChangeBankCell ()
@property (weak, nonatomic) IBOutlet UILabel *numLabel;
@property (weak, nonatomic) IBOutlet UILabel *statusLabel;
@property (weak, nonatomic) IBOutlet UILabel *typeLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UILabel *oldBankNumLabel;
@property (weak, nonatomic) IBOutlet UILabel *oldBankNumNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *oldBankNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *neuBankNumLabel;
@property (weak, nonatomic) IBOutlet UILabel *neuBankNumNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *neuBankNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *newuZhihangLabel;
@property (weak, nonatomic) IBOutlet UILabel *oldZhihangLabel;

@end

@implementation DitchMsgChangeBankCell {

}

- (void)setCellInfo:(JSONModel *)info {
    [super setCellInfo:info];
    OrderDealModel *orderDealModel = info;
    self.numLabel.text =     [NSString ignoreEmptyStr:orderDealModel.id];
    self.statusLabel.text =  [NSString ignoreEmptyStr:[self getOrderStatusNameFromtypeId:orderDealModel.type.intValue andSignId:orderDealModel.sign.intValue]];
    self.typeLabel.text =    [NSString ignoreEmptyStr:[self getOrderTypeNameFromtypeId:orderDealModel.type.intValue]];
    self.timeLabel.text =    [[NSDate dateWithString:orderDealModel.creatTime formatString:@"yyyyMMddHHmmss"] formatStringWithFormat:@"yyyy-MM-dd"];
}

- (void)setOrderContentInfo:(OrderDealDetailOrderContentInfo *)orderContentInfo {
    if(orderContentInfo == nil){
        self.oldBankNumLabel.text = @"";
        self.oldBankNumNameLabel.text = @"";
        self.oldBankNameLabel.text = @"";
        self.neuBankNumLabel.text = @"";
        self.neuBankNumNameLabel.text = @"";
        self.neuBankNameLabel.text = @"";
        self.oldZhihangLabel.text = @"";
        self.newuZhihangLabel.text = @"";
        return;
    }
    self.oldBankNumLabel.text = [NSString ignoreEmptyStr:orderContentInfo.oldBankId];
    self.oldBankNumNameLabel.text = [NSString ignoreEmptyStr:orderContentInfo.oldBankAccountName];
    self.oldBankNameLabel.text = [NSString ignoreEmptyStr:orderContentInfo.oldBankName];
    self.neuBankNumLabel.text = [NSString ignoreEmptyStr:orderContentInfo.neuBankId];
    self.neuBankNumNameLabel.text = [NSString ignoreEmptyStr:orderContentInfo.neuBankAccountName];
    self.neuBankNameLabel.text = [NSString ignoreEmptyStr:orderContentInfo.neuBankName];
    self.oldZhihangLabel.text = [NSString ignoreEmptyStr:orderContentInfo.oldSubBank];
    self.newuZhihangLabel.text = [NSString ignoreEmptyStr:orderContentInfo.neuSubBank];

}


@end